home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir36
/
batcmd94.zip
/
USEBATS.WHY
< prev
next >
Wrap
Text File
|
1991-05-27
|
7KB
|
279 lines
USE BATs,
by Don Hinds
Especially if you have a hard disk. They save time, typing
and do it faster than you can. In fact there are only 2 drawbacks
to using bat files. One, is you often get so many you can't
remember what the bat with that short name does. The second
drawback is that every file, no matter how small, takes at least
2K of disk space. A 12 byte file takes the same space as 2024
bytes. I have written a program to solve number two. All
(almost) your bat files can go into a single ASCII list. It also
solves the first objection.
But why use bat files? As you begin to fill up your hard disk
you'll find yourself with many directories, and subdirectories.
At least you should. Because the more directories the better
organized the disk (up to a point). But changing between them is
a chore. And then checking to see if what you're looking for is
in 'this one'. A bat file simplifies this. A one or 2 letter
command will do the whole job. My UTIL directory has 3 subdirs.
DAIG for diagnose, DIAGM for model M diags, and BAK for little
used utilities. So this complete set looks like this.
C:\UTIL
C:\UTIL\BAK
C:\UTIL\DAIG
C:\UTIL\DIAGM
Changing between them and getting a DIR takes
C:>cd \util\bak
C:\UTIL\BAK>dir/w
and so forth.
Now I had 4 bat files each with a 2 letter name. UT, UB, UD
and UM. Typing just the two letters would change the dir/subdir
and display the directory. As your directories grow you will find
this more and more useful.
You can also run programs from a bat file. No doubt you have
set a PATH for command.com to look for programs. But some
programs like Procomm have associated files. There are the
telephone list, parameters and so forth. They must be present to
operate Procomm. So putting the DIR with Procomm in the PATH
doesn't work. But a bat file (pro) will change directories and
run Procomm. You use an editor that will write ASCII files to do
your bat. The I keep Procomm in the dir \COM. So this simple bat
takes you to \COM and runs Procomm with just 'pro'.
cd\com
procomm
You name it PRO.BAT.
If you have Wordstar 4 (WS) it comes with Wordfinder (WF). This
is is the thesaurus. I have 2 bats for Wordstar. One goes to the
WS directory and loads only WS. The other loads WF first then
WS.
(ws.bat)
cd\ws
ws
(ws+.bat)
cd/ws
wf
ws
You can have it do something when you are finished also. In
my 'pro.bat' I added the command to changedir to \DWN and show
the directory. I have Procomm set do put downloads into \DWN. So
here is the new PRO.BAT
cd\com
procomm
cd\dwn
dir/w
When you are finished with Procomm you will see the list of
files in the dir \DWN where your new downloads are.
While this is more to show WHY to use bats, I must include a
short note on more advanced bats. You may also use parameters.
Here is a very simple example. You can make a bat to copy for
you. It is almost as long as the copy command and is just to
illustrate parameter use. The copy command is
COPY "from" "to"
C:>copy *.txt b:*.doc (copies all TXT to B and renames to DOC)
You 'can' make a bat called 'c' to do this.
(c.bat)
copy %1 %2
dir %3
To use type
C:>c *.txt b:*.doc b:
'c' is the bat. %1 = '*.txt'. %2 = 'b:*.doc". %3 = 'b:'
So you can do a LOT with bat files and save typing and time.
So I wrote a program to save the disk space my 40+ bats took
up. That's over 80K of space! And the total bytes was less than
3K. It is called Bat Commander. The actual program is Z.COM. It
is slightly longer to use than 'normal' bats. Because you must
name each bat with at least a 2 letter name, and use the Z. My
'pro' bat in the ascii list is identical to the one above. To use
it I type,
z pro
The difference in making the bat is that ALL of the bats are
in a single long list. They are separated by 'END'. And the
name of the bat is in the list. The 'pro' bat in the list looks
like this.
END
pro
cd\com
procomm
cd\dwn
dir/w
END
The bats may be listed, contents listed etc. with Bat Commander.
This hopefully will get you to use bats, and also my program.
Look for BATCMDxx.ZIP (where 'xx' is the latest version).
HINTS
THere are several programs that I depend upon and should be in
every 'kit' for hard disk users.
LIST - Replaces type. Allows forward and reverse scrolling and more.
PKZIP/PKUNZIP- The tool(s) for ZIPing and UNZIPing libraries.
SHEZ - For looking into ZIPs and viewing text. Also remove single file
etc.
DR, RN and CO - From PC Magazine. They are for moving between DIRs and
move, copy, rename etc etc.
VDE - A very nice editor. Originally for CPM. Shows return marks '<'
so is great for editing Z.FLS (for Bat Commander).
EDIT - Editor if you can't find VDE.
FLUSH - (with FLMK) puts a 'mark' in RAM so you can FLUSH resident
programs when finished.
MAP - Shows programs in RAM and room left.
XEQ - You put those small COMs 'into' XEQ and save disk space.
MV - moves files between DIRs
SRxx - Still River shell
I used to have DOC subdirectories for each major section. Like
\DOS, \UTIL, would have \DOS\DOC, \UTIL\DOC etc. But I have put all
the docs for each into an ZIP. With Bat Commander and SHEZ I can look
at them from anywhere on the disk. To see the DOSDOC.ZIP, I type
'z doc'. And for the UTILDOC.ZIP 'z ud'. The bat file changes to the
proper DIR, calls SHEZ to look at the ZIPed doc file. When I'm done
I'm returned to the original DIR all automatically. Example;
(UD bat in Z.FLS)
END
ud
shez \util\utildoc.zip
END
You type 4 chars (z ud) instead of 22. (shez \util\utildoc.zip).
Which is not only faster, but less chance to mistype. You can of
course, have UD.BAT with the single line 'shez \util\utildoc.zip'.
But that takes 2K of disk space, and in Z.FLS takes a total of 30
bytes! (including END and returns etc). (a plug for using Bat
Commander)
I hope you see the wisdom of using bats and of course, Bat Commander.
Perhaps I have given you some insight and ideas in their use. I also
find that editing bats is much easier with Z.FLS because the bats are
all in one place. Where you would normally have them in every
directory and hard to find the one to edit.
************************************************************
* *
* If you find Bat Commander useful please send $5 to: *
* you *
* CASTLEsoft can *
* 3 Draper Castle afford *
* Dorchester Mass. 02122 five $ *
* *
************************************************************